The present invention relates generally to systems for tracking the operation of a control program and for displaying a graphical representation of the program's behavior as it performs run-time control program operations. More specifically, the invention relates to an improved tracking and display system that supplies a useful visual indication of the logic flow within the control program. The visual indication may use different colors or line style of flowchart block outlines to show which paths of logic have been and are being executed in the run-time engine.
Control programs supply the instructions used by computers and automated manufacturing systems to perform a variety of tasks. By way of example, a control program may be supplied to a manufacturing control computer or process control computer that is responsible for automating a manufacturing task. Today, complex systems of all types are run by computers executing control programs.
During the design and debugging of control programs, the system engineer or programer may benefit from watching the program operate under various different conditions. Watching the program operate can be particularly helpful where the logic is complex, with many conditional branches in the logic flow.
One way to accomplish this is to place the control program in a single step mode, where the program pauses between each program step or breakpoint, allowing the engineer or programmer to inspect all relevant data values to thereby understand whether the program is operating correctly, and if not, why not. Single step debugging techniques are not suitable for all types of control programs. In particular, control programs that input or output data to real time systems simply may not work correctly when single stepped at slow speed.
To make it easier for the engineer or programmer to visualize how a control program is operating, some development systems and debugging systems graphically display flowcharts, where the flow through conditional branches is designated by a visual attribute. Specifically, program statements, including conditional branching statements, are shown by flowchart symbols, and these symbols may be highlighted or not highlighted to show whether they were invoked or were not invoked during control program operation.
The conventional flowcharting display technique is not very useful in certain types of control programs that operate at very high speed. Although the flowchart display program might theoretically keep pace with the operating control program, the screen display and the engineer or programmer watching it simply cannot. To illustrate, consider a control program that operates cyclically at 50 cycles per second, where each cycle may invoke different logic flow branches than the cycle before it. The human operator simply cannot absorb information at this 50 cycle-per-second rate. Thus, even if the flowchart display program were to display flow through each cycle, the human operator would see only a blur.
The present invention affords an improved graphical representation of a control program's behavior. The computer-implemented control program tracker of the invention gives the user useful runtime information even if the control program is operating at a speed too high for the human to perceive directly.
The computer-implemented control program tracker employs a runtime engine that includes a monitor module for monitoring the runtime performance of control program operations specified by the control program. A memory data structure, accessed by the runtime engine, stores a representation of the control program as a plurality of blocks. Each block corresponds to at least one of the control program steps or operations. The memory data structure stores block state information associated with the runtime performance of the control program as it operates.
The computer-implemented program tracker further includes a graphical display engine that generates spatially arranged graphical objects that correspond to the plurality of blocks. The objects are arranged to convey information about the relationship of the control program operations. In a preferred embodiment, the display engine generates graphical displays that resemble conventional flowcharts, although other types of program display notation may also be implemented.
A tracking module accesses the memory data structure and communicates with the graphical display engine to selectively impart different visual representations to the graphical objects. In the preferred embodiment, different colors, or different line thicknesses or shading, are used to reflect the runtime performance of the control program. Although different arrangements are possible, the presently preferred implementation identifies at least three different states that correspond to different runtime performance conditions. The states include: (a) always executed, (b) sometimes executed, (c) never executed. Different colors are assigned to each of these three states, and these colors are used by the graphical display engine when the graphical objects are displayed to the user. The user can then readily determine from the graphical object colors how the control program has been performing, even if the control program operates at high speed.
The invention can be incorporated into a variety of different applications, including program control development environments, debugging systems and runtime operating system environments, to name a few. For a more complete understanding of the invention, its objects and advantages, reference may be had to the following specification and to the accompanying drawings.